﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace SimpleGameFramework.Entity
{
    /// <summary>
    /// 实体辅助器基类
    /// </summary>
    public abstract class EntityHelperBase
    {
        /// <summary>
        /// 实例化实体
        /// </summary>
        /// <param name="entityAsset">要实例化的实体资源</param>
        /// <returns>实例化后的实体</returns>
        public abstract object InstantiateEntity(object entityAsset);

        /// <summary>
        /// 创建实体
        /// </summary>
        /// <param name="entityInstance">实体实例</param>
        /// <param name="entityGroup">实体所属的实体组</param>
        /// <param name="userData">用户自定义数据</param>
        /// <returns>实体</returns>
        public abstract Entity CreateEntity(object entityInstance, EntityGroup entityGroup, object userData);

        /// <summary>
        /// 释放实体
        /// </summary>
        /// <param name="entityAsset">要释放的实体资源</param>
        /// <param name="entityInstance">要释放的实体实例</param>
        public abstract void ReleaseEntity(object entityAsset, object entityInstance);
    }
}

